/**
 * Copyright (C) 2010, 2011 Neofonie GmbH
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package eu.dicodeproject.blogimport.parser;

import org.apache.hadoop.hbase.util.Bytes;



/**
 * This enum holds the definition for xpathes and hbase column names
 * {@link BlogDocument}.
 * 
 * @author claude, doris
 * 
 */
public enum ContentMapFields {

  /**
   * Title of a the blog.
   */
  BLOGTITLE {
    private byte[] val = Bytes.toBytes("blogtitle");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Blog_Title"; }    
  },
  /**
   * Language of a blog document.
   */
  LANGUAGE {
    private byte[] val = Bytes.toBytes("lang");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Blog_Language"; }    
  },
  /**
   * Title of a the post.
   */
  TITLE {
    private byte[] val = Bytes.toBytes("title");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Post_Title"; }    
  },
  /**
   * Url of a blog post.
   */
  URL {    
    private byte[] val = Bytes.toBytes("url");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Post_OriginalURL"; }    
  },
  /**
   * Categories of a blog post.
   */
  CATEGORIES {
    private byte[] val = Bytes.toBytes("categories");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Post_Categories"; }    
  },
  /**
   * Publication date as timestamp in milliseconds of a blog post.
   */
  PUBLISHTIMESTAMP {
    private byte[] val = Bytes.toBytes("creationDate");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Post_Dates_PublishTimestamp"; }    
  },
  /**
   * Body aka article text of a blog post.
   */
  BODY {
    private byte[] val = Bytes.toBytes("text");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Post_Body"; }    
  },
  /**
   * Author of a blog post.
   */
  AUTHOR {
    private byte[] val = Bytes.toBytes("author");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Post_Author"; }    
  },
  /**
   * Tags of a blog post.
   */
  TAGS {
    private byte[] val = Bytes.toBytes("tags");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_Content_Post_Tags"; }    
  },
  /**
   * Automatic tags of a blog post.
   */
  AUTOTAGS {
    private byte[] val = Bytes.toBytes("autotags");    
    public byte[] bytes() { return val; }
    public String toString() { return "Document_AutomaticTags_AutomaticTag"; }    
  }; 
  public abstract byte[] bytes ();  
}
